const Server = require("../server");
const path = require("path");

const config = {
  appNmae: "",
  appPrefix: "/app",
  routeDir: path.resolve(__dirname, "./routes"),
  jwt: {
    secret: "xxxxxxx",
  },
  mysql: {
    modelDir: path.resolve(__dirname, "./models"),
    database: "levenx-koa-server",
    host: "182.92.229.161",
    username: "root",
    password: "Levenx0314!@#$",
  },
  redis: {
    host: "39.108.168.104",
    password: "Levenx0314!",
    db: "1",
  },
  log: { filename: "logs/levenx", level: "error" },
  mail: {
    host: "smtp.exmail.qq.com",
    auth: {
      user: "sunlejin@levenx.com",
      // 这里密码不是qq密码，是你设置的smtp授权码
      pass: "WNneHu7pGSB3kxw2",
    },
    from: '"乐闻世界" <sunlejin@levenx.com>',
  },
  cors: true,
};

const App = new Server(config);

App.start(8000);
